package com.bitantenna;

import java.io.IOException;

public abstract class SpotTask  implements Runnable {

	protected Spot spot;

	protected abstract void performTask(Spot spot) throws IOException;

	public SpotTask(Spot s) {
		spot=s;
	}

	@Override
	public void run() {
		while (spot.tasksKeepRunning() ) {									
			try {
				performTask(spot);
			} catch (IOException ex) {
				System.out.println("got exception "+ex);
			}
		}
	}

}